<!-- links.TPL -->
<div style="clear:both"></div>
{if $ads}
<div class="titulo_largo">
		<div style="float: left;">	
			<h3>{$smarty.const.CATEGORY}</h3>
		</div>
</div>
<span class="P66" >{$categoryPath}</span>
{/if}

{if $bannerHid }
 <div id="banner_horizontal" class="bannerHorizontalCat3" >  
 	
	 {if $bannerHid==$smarty.const.ID_CAT_COMPRA} 				 				
				    {php}
				    	echo "<div class=\"horizontalIzquierdo\">";
				    	$section="banner_horizonal_01_venta";
						include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";					
						$section="banner_horizonal_02_venta";
						include "ad_get.php";
						echo "</div>";
					{/php}
	{elseif $bannerHid==$smarty.const.ID_CAT_ALQUILER}
	 				{php}
	 					echo "<div class=\"horizontalIzquierdo\">";	
				    	//$section="banner_horizonal_01_alquiler";
						$section="banner_horizonal_02_venta";
                        include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";	
						 //$section="banner_horizonal_02_alquiler";
						include "ad_get.php";
						echo "</div>";
					{/php}	
	{elseif $bannerHid==$smarty.const.ID_CAT_SERVICIOS}
	 				{php}
	 					echo "<div class=\"horizontalIzquierdo\">";		
				    	$section="banner_horizonal_01_servicios";
						include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";				
						$section="banner_horizonal_02_servicios";
						include "ad_get.php";
						echo "</div>";
					{/php}
	{/if}
</div>
{/if}
 
<div style="clear:both"></div>
<!-- FIN NUEVO-->

{if $ads}
<div style="margin-left:1px;margin-top:92px;" >
	<table id="ads-table" cellspacing="0" class="box ads-table" style="clear:both">
	<tbody>
		<tr>
			<th>{$PICTURE_URL} {$smarty.const.PICTURE_TEXT}</a> {$image_picture}</th>
			<th width="30%">{$TITLE_URL} {$smarty.const.TITLE}</a></th>
			<th width="300">{$MARCA_URL} {$smarty.const.BRAND}</a> {$image_brand}</th>
			<th width="300">{$MODELO_URL} {$smarty.const.MODEL}</a> {$image_model}</th>
			<th width="300">{$TIPO_URL} {$smarty.const.LA_TYPE}</a> {$image_tipo}</th>
			<th width="300">{$ANIO_URL} {$smarty.const.ANIO}</a> {$image_anio}</th>
			<th width="300">{$UBICACION_URL} {$smarty.const.UBICA}</a> {$image_ubicacion}</th>		
			<th>{$PRECIO_URL}Precio</a> {$image_precio}</th>	
		</tr>
		{foreach item=ad from=$ads}  
		 <tr class="{cycle values=",alt"} itemLista {if $ad.PREMIUM}premium{elseif $ad.SPECIAL}special{/if}">			
			<td>{$ad.IMAGEYESNO}</td>
			<td>{$ad.TITLE}</td>
			
            <td>{$ad.MARCA}</td>
			<td>{$ad.MODELO}</td>
			<td>
					{if $ad.cat_grandfatherid == $smarty.const.ID_CAT_COMPRA}
						{$smarty.const.OPERACION_VENTA}
					{else}
						{$smarty.const.OPERACION_ALQUILER}
					{/if}				
			</td>
			<td>{$ad.ANIO}</td>
			<td>{$ad.PROVINCIA}</td>
			<td align="right" style="font-weight:normal;"><small>{$ad.MONEDA}</small>&nbsp;{$ad.PRECIO}&nbsp; </td>
		 </tr>
		{php}
 	 	flush(); 	 	
 	 	{/php}	
		{/foreach}
	</tbody>	
	</table>
    {literal}
    <script language="javascript">
        /*$(function() {
            $("#ads-table tr.fakeLinks").each(function() {
                var href = $(this).find("a:first").attr("href");
                $(this).click(function() {
                    window.location.href = href;
                });                                
            });
        });*/
    </script>
    {/literal}
	<div style="text-align:right; width:770px;">
	{if $next_url}	
		<a href="{$next_url}" class="button nextPrev" style="float:right">{$smarty.const.NEXT_ADS} {$NUM_PER_PAGE} &gt;</a> 
	{else}{/if}

    {if $prev_url} 
		<a href="{$prev_url}" class="button nextPrev" style="float:right">&lt; {$smarty.const.PREVIOUS_ADS} {$NUM_PER_PAGE}</a> 
	{else}{/if}


    </div>

</div>



{elseif $ALLOWADS}
	<div style="position: absolute; top: 1px; left: 200px;" >
		<p>{$smarty.const.LA_NOT_YET_ADS}</p>		
	{if $IS_LOGGED_IN}
		<p><b><img src="layout_images/new/addad.gif" alt="{$smarty.const.LA_ADD_AD}" />
		<a href="item.php?catid={$catid}">{$smarty.const.LA_ADD_AD}</a></b></p>
	{else}
	<div align="center">
		<p><img src="layout_images/new/login.gif" alt="{$smarty.const.LA_LOGIN}" />
		{$smarty.const.LA_NOT_YET_ADS_MORE}</p>
	</div>	
	{/if}
	</div>
	
	<p>&nbsp;</p>
	<p>&nbsp;</p>
<!-- /div-->	
{/if}
<!-- // links.TPL -->
